<?php

namespace Drupal\shusy_product_parameter\ViewsController;

use Drupal\shusy_product_parameter\ViewsController\handler\field\ShusyProductParameterEditLinkViewsField;
use EntityDefaultViewsController;


class ShusyProductParameterViewsController extends EntityDefaultViewsController {

  public function views_data() {
    $data = parent::views_data();
    if (!empty($this->info['base table'])) {
      $table = $this->info['base table'];
      $info = [];

      $info[$table]['edit_link'] = [
        'title' => t('编辑'),
        'help' => t('编辑.'),
        'field' => [
          'handler' => ShusyProductParameterEditLinkViewsField::class,
        ],
      ];

      $data = drupal_array_merge_deep($data, $info);
    }
    return $data;
  }
}
